package com.StarStudio.Service;

import com.ruoyi.common.core.Entity.Exchange;
import com.ruoyi.common.core.Entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Service
@FeignClient(value = "Exchange")
public interface ExchangeService {


    @PostMapping("/post")
    Result addExchange(@RequestBody Exchange exchange);

    @DeleteMapping("/byGoodsCondition/{orderId}/{itemId}")
    void deleteExchangeByGoodsCondition(@PathVariable(value = "orderId") long orderId, @PathVariable(value = "itemId") long itemId);


    @RequestMapping("/ByCouponsIdAndExchangeStoreToday")
    List<Exchange> findByCouponsIdAndExchangeStoreToday(@RequestParam(value = "nickName") String nickName,@RequestParam("today") String today);

    @RequestMapping("/ByCouponsIdAndExchangeStore")
    List<Exchange> findByCouponsIdAndExchangeStore(@RequestParam("StoreName") String StoreName);
}
